<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:WC="wgcontrols">
  <xsl:template match="WC:Tags.Button[@Attr.CustomStyle='RibbonBarPushBig']" mode="modContent">
    <xsl:param name="prmIsEnabled" />
    <div>
      <xsl:attribute name="class">
        <xsl:if test="@Attr.DropDown">Common-HandCursor RibbonBarButton-BigDropDownControl</xsl:if>
        <xsl:if test="not(@Attr.DropDown)">
          <xsl:if test="@MyIsPushed='1'">Common-HandCursor RibbonBarPushButton-BigControl</xsl:if>
          <xsl:if test="not(@MyIsPushed='1')">Common-HandCursor RibbonBarButton-BigControl</xsl:if>
        </xsl:if>
      </xsl:attribute>
      <xsl:attribute name="style">
        <xsl:text>width:100%;height:100%;</xsl:text>
        <xsl:call-template name="tplApplyStyles" >
          <xsl:with-param name="prmFont" select="0" />
        </xsl:call-template>
      </xsl:attribute>
      <xsl:if test="not($prmIsEnabled='0')">
        <xsl:call-template name="tplSetHighlight" >
          <xsl:with-param name="prmIsEnabled" select="$prmIsEnabled" />
        </xsl:call-template>
      </xsl:if>
      <table style="width:100%;height:66px;table-layout:fixed;" cellpadding="0" cellspacing="0" dir="ltr">
        <col width="5px"/>
        <col />
        <col width="5px"/>
        <tr>
          <td class="ButtonLeft"></td>
          <td class="ButtonCenter" align="center" valign="center" dir="{$dir}">
            <div style="height:37px;text-align:center;overflow:hidden;">
              <img src="{@Attr.Image}" style="width:32px;height:32px;margin-top:2px;">
                <xsl:if test="$prmIsEnabled='0'">
                  <xsl:attribute name="Class">Button-Image_Disabled</xsl:attribute>
                </xsl:if>
                <xsl:if test="not ($prmIsEnabled='0')">
                  <xsl:attribute name="Class">Button-Image</xsl:attribute>
                </xsl:if>
              </img>
            </div>
            <div class="Common-FontData RibbonBarButton-Text">
              <xsl:attribute name="style">
                <xsl:text>height:29px;overflow:hidden;</xsl:text>
                <xsl:call-template name="tplApplyStyles" >
                  <xsl:with-param name="prmBorder" select="0" />
                  <xsl:with-param name="prmBackground" select="0" />
                  <xsl:with-param name="prmCursor" select="0" />
                </xsl:call-template>
              </xsl:attribute>
              <xsl:call-template name="tplDecodeTextAsHtml"/>
              <xsl:if test="@Attr.DropDown">
                <img src="[Skin.Path]RibbonToolBarButtonDropDown.gif.wgx"/>
              </xsl:if>
            </div>
          </td>
          <td class="ButtonRight"></td>
        </tr>
      </table>
    </div>
  </xsl:template>

  <xsl:template match="WC:Tags.Button[@Attr.CustomStyle='RibbonBarPushMedium']" mode="modContent">
    <xsl:param name="prmIsEnabled" />
    <div style="width:100%;height:100%;">
      <xsl:attribute name="class">
          <xsl:if test="@MyIsPushed='1'">Common-HandCursor xxxx RibbonBarPushButton-MediumControl</xsl:if>
          <xsl:if test="not(@MyIsPushed='1')">Common-HandCursor xxxx RibbonBarButton-MediumControl</xsl:if>
      </xsl:attribute>
      <xsl:if test="not($prmIsEnabled='0')">
        <xsl:call-template name="tplSetHighlight" >
          <xsl:with-param name="prmIsEnabled" select="$prmIsEnabled" />
        </xsl:call-template>
      </xsl:if>
      <table style="width:100%;height:22px;table-layout:fixed;" cellpadding="0" cellspacing="0" dir="ltr">
        <col width="3px"/>
        <col />
        <col width="3px"/>
        <tr>
          <td class="ButtonLeft"></td>
          <td class="ButtonCenter" align="left" valign="center" >
            <nobr dir="{$dir}" class="Common-FontData RibbonBarButton-Text">
              <img src="{@Attr.Image}" style="width:16px;height:16px">
                <xsl:if test="$prmIsEnabled='0'">
                  <xsl:attribute name="Class">Button-Image_Disabled</xsl:attribute>
                </xsl:if>
                <xsl:if test="not ($prmIsEnabled='0')">
                  <xsl:attribute name="Class">Button-Image</xsl:attribute>
                </xsl:if>
              </img>
              <xsl:if test="@Attr.Text and not (@Attr.Text = '')">
                &#160;<xsl:call-template name="tplDecodeTextAsHtml"/>
              </xsl:if>
              <xsl:if test="@Attr.DropDown">
                <img src="[Skin.Path]RibbonToolBarButtonDropDown.gif.wgx"/>
              </xsl:if>
            </nobr>
          </td>
          <td class="ButtonRight"></td>
        </tr>
      </table>
    </div>
  </xsl:template>

  <xsl:template match="WC:Tags.Button[@Attr.CustomStyle='RibbonBarPushSmall']" mode="modContent">
    <xsl:param name="prmIsEnabled" />
    <div style="width:100%;height:100%;">
      <xsl:attribute name="class">
        <xsl:if test="@MyIsPushed='1'">Common-HandCursor RibbonBarPushButton-SmallControl</xsl:if>
        <xsl:if test="not(@MyIsPushed='1')">Common-HandCursor RibbonBarButton-SmallControl</xsl:if>
      </xsl:attribute>
      <xsl:if test="not($prmIsEnabled='0')">
        <xsl:call-template name="tplSetHighlight" >
          <xsl:with-param name="prmIsEnabled" select="$prmIsEnabled" />
        </xsl:call-template>
      </xsl:if>
      <table style="width:100%;height:22px;table-layout:fixed;" cellpadding="0" cellspacing="0" dir="ltr">
        <col width="3px"/>
        <col />
        <col width="3px"/>
        <tr>
          <td class="ButtonLeft"></td>
          <td class="ButtonCenter" align="center" valign="center" >
            <nobr dir="{$dir}">
              <img src="{@Attr.Image}" style="width:16px;height:16px;vertical-align:middle;">
                <xsl:if test="$prmIsEnabled='0'">
                  <xsl:attribute name="Class">Button-Image_Disabled</xsl:attribute>
                </xsl:if>
                <xsl:if test="not ($prmIsEnabled='0')">
                  <xsl:attribute name="Class">Button-Image</xsl:attribute>
                </xsl:if>
              </img>
              <span class="Common-FontData RibbonBarButton-Text">
                <xsl:call-template name="tplDecodeTextAsHtml"/>
                <xsl:if test="@Attr.DropDown">
                  <img src="[Skin.Path]RibbonToolBarButtonDropDown.gif.wgx"/>
                </xsl:if>
              </span>
            </nobr>
          </td>
          <td class="ButtonRight"></td>
        </tr>
      </table>
    </div>
  </xsl:template>

</xsl:stylesheet>
